package cn.jeeweb.web.modules.equipment.service.impl;

import cn.jeeweb.common.annotate.UiPropertyField;
import cn.jeeweb.common.bean.UiPropertyVo;
import cn.jeeweb.common.mybatis.mvc.service.ICommonService;
import cn.jeeweb.common.mybatis.mvc.service.impl.CommonServiceImpl;
import cn.jeeweb.common.mybatis.mvc.wrapper.EntityWrapper;
import cn.jeeweb.common.utils.SpringContextHolder;
import cn.jeeweb.web.modules.equipment.entity.EqsFaultCode;
import cn.jeeweb.web.modules.equipment.mapper.EqsFaultCodeMapper;
import cn.jeeweb.web.modules.equipment.service.IEqsFaultCodeService;
import cn.xjzn.framework_Core.ModuleServe;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import static cn.jeeweb.common.utils.ReflectionUtils.getSuperClassGenricType;

/**
* @description: eqs_fault_code服务接口
*/
@Transactional
@Service("eqsFaultCodeService")
public class EqsFaultCodeServiceImpl extends CommonServiceImpl<EqsFaultCodeMapper,EqsFaultCode> implements IEqsFaultCodeService {

    public EqsFaultCode getById(String json){
        String id_ = "";
        try {
            JSONObject jsonObject = JSON.parseObject(json);
            id_ = jsonObject.getString("id");
        } catch (Exception e) {
            id_ = json;
        }
        EqsFaultCode o = selectById(id_);
        if(o != null){
            initReferenceObject(o,"1");
        }
        return o;
    }


}